from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^comics/', include('comics.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    # (r'^inicio/$', 'comics.registration.views.say'),
    (r'^admin/(.*)', admin.site.root),
    (r'^accounts/', include('registration.urls')),
    (r'^$', direct_to_template,
        { 'template': 'index.html' }, 'index'),
    url(r'^profile/$', 'comics.registration.views.user_profile', name='user_profile'),
    (r'^imagenes/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': 'C:/comics/templates/imagenes'}),
    url(r'^upload/$', 'comics.upload.views.image_upload', name='image_upload'),
    (r'^upload/thanks/', 'comics.upload.views.sayThanks'),
    (r'^profile/success/', 'comics.registration.views.sayThanks'),
    url(r'^view/$', 'comics.viewer.views.display', name='viewer'),
    url(r'^view/profile/$', 'comics.viewer.views.view_profile', name='view_profile'),
    #url(r'^profile/$',
    #    direct_to_template,
    #    { 'template': 'registration/user_profile.html' },
    #    name='user_profile'),
)

